package com.hundun.login.controller;


import com.hundun.domain.Result;
import com.hundun.login.entity.XcxUser;
import com.hundun.login.mapper.XcxUserMapper;
import com.hundun.login.service.XcxUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 谢
 * @since 2020-05-07
 */
@RestController
@RequestMapping("/login/xcx-user")
@Api(tags ="登录业务")
public class XcxUserController {

    @Autowired
    XcxUserService xcxUserService;

    @GetMapping("test")
    public Result<String> test(){
        return Result.success();
    }

    @ApiOperation("登录")
    @PostMapping("login")
    public Result<String> login(@RequestBody XcxUser xcxUser) throws IOException {
       return xcxUserService.login(xcxUser);
    }




}

